/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2018-2023.
 * Description: irq: merge high-precision timer can reduce interrupts and context switches
 * Author: langfei
 * Create: 2023-12-15
 */

#ifndef _PROC_HIGH_PRECISION_H_
#define _PROC_HIGH_PRECISION_H_

#ifdef CONFIG_EULEROS_MERGE_TIMER_IRQ
extern int correct_proc_stat;
DECLARE_PER_CPU(int, period_divisor);

extern void get_old_user_time(u64 *user, struct kernel_cpustat *kcpustat, int i);
extern void get_new_user_time(u64 *user, struct kernel_cpustat *kcpustat, int i);
#else
static inline void get_old_user_time(u64 *user, struct kernel_cpustat *kcpustat, int i) {}
static inline void get_new_user_time(u64 *user, struct kernel_cpustat *kcpustat, int i) {}
#endif /* CONFIG_EULEROS_MERGE_TIMER_IRQ */

#endif /* _PROC_HIGH_PRECISION_H_ */
